import java.awt.*;

class Anchor
{
	int x;
	int y;

	boolean active;

	public Anchor(int x,int y)
	{
		this.x = x;
		this.y = y;
		active = false;
	}

	void draw(Graphics g,boolean mode)
	{
		if (mode) g.drawRect(x - 3,y - 3,6,6);
		else g.drawRect(x - 2,y - 2,4,4);
	}


	boolean checkActive(int mx,int my)
	{
		active = (x - 3 <= mx) && (x + 3 >= mx) && (y - 3 <= my) && (y + 3 >= my);
		return active;
	}

	void move(int dx,int dy)
	{
		x += dx;
		y += dy;
	}
}
